package routers

import (
	"github.com/gin-gonic/gin"
	"shop-admin/controller"
	"shop-security/preAuthorize"
)

func privateIndexImg(router *gin.RouterGroup) {
	api := &controller.IndexImgController{}
	indexImg := router.Group("/admin/indexImg")
	{
		indexImg.GET("/page", api.Page)                                                      //分页获取
		indexImg.GET("/info/:imgId", api.Info)                                               //获取信息
		indexImg.POST("", preAuthorize.HasPermission("admin:indexImg:save"), api.Save)       //保存
		indexImg.PUT("", preAuthorize.HasPermission("admin:indexImg:update"), api.Update)    //修改
		indexImg.DELETE("", preAuthorize.HasPermission("admin:indexImg:delete"), api.Delete) //删除
	}
}
